package main

import (
	"fmt"
	"sync"
	"time"
)

func main() {
	var wg sync.WaitGroup
	for i := 0; i < 100; i++ {
		go func(i int) {
			wg.Add(3)
			go func() {
				wg.Done()
			}()
			go func() {
				wg.Done()
			}()
			go func(i int) {
				wg.Done()
				fmt.Printf("done for %d\n", i)
			}(i)

		}(i)
	}
	time.Sleep(1 * time.Second)
}
